package com.moli.iov.admin.service.impl;

import com.moli.iov.admin.service.IWebLogFacadeService;
import com.moli.iov.sys.model.po.mongodb.WebLog;
import com.moli.iov.sys.remote.IWebLogRemoteService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 日志业务
 * </p>
 *
 * @author zql
 * @since 2019/9/24 11:45
 */
@Slf4j
@Service
public class WebLogFacadeServiceImpl implements IWebLogFacadeService {


  @Reference(group = "${service.group}", check = false)
  private IWebLogRemoteService webLogRemoteService;

  /**
   * 保存日志
   * @param webLog
   */
  @Async
  @Override
  public void saveLog(WebLog webLog) {
    webLogRemoteService.saveLog(webLog);
  }
}
